package com.yunxin.core.infra.persistence.converter;

import com.yunxin.core.domain.external.channel.ChannelCustomConfig;
import com.yunxin.core.domain.external.channel.ChannelPromotionInfo;
import com.yunxin.core.domain.external.channel.ChannelPromotionPriceInfo;
import com.yunxin.core.domain.model.channel.*;
import com.yunxin.core.infra.persistence.entity.channel.*;
import com.yunxin.core.infra.persistence.entity.channel.query.result.ChannelPromotionInfoResult;
import com.yunxin.core.infra.persistence.entity.channel.query.result.ChannelPromotionPriceInfoResult;
import org.mapstruct.Mapper;

/**
 * @author zero°
 * @since 2023-07-12
 */
@Mapper(componentModel = "spring")
public interface ChannelConvertor {

    /**
     * do 转 entity
     *
     * @param channelPromotionMerchantConfigDO channelPromotionMerchantConfigDO
     * @return ChannelPromotionMerchantConfig
     */
    ChannelPromotionMerchantConfig toChannelPromotionMerchantConfig(ChannelPromotionMerchantConfigDO channelPromotionMerchantConfigDO);

    /**
     * do 转 entity
     *
     * @param channelAdvanceChargeRecordDO channelAdvanceChargeRecordDO
     * @return ChannelAdvanceChargeRecord
     */
    ChannelAdvanceChargeRecord toChannelAdvanceChargeRecord(ChannelAdvanceChargeRecordDO channelAdvanceChargeRecordDO);

    /**
     * do 转 entity
     *
     * @param channelPromotionApiCustomerConfigDO channelPromotionApiCustomerConfigDO
     * @return ChannelPromotionApiCustomerConfig
     */
    ChannelPromotionApiCustomerConfig toChannelPromotionApiCustomerConfig(ChannelPromotionApiCustomerConfigDO channelPromotionApiCustomerConfigDO);

    /**
     * do 转 entity
     *
     * @param channelCustomerApplyLibraryRecordDO channelCustomerApplyLibraryRecordDO
     * @return ChannelCustomerApplyLibraryRecord
     */
    ChannelCustomerApplyLibraryRecord toChannelCustomerApplyLibraryRecord(ChannelCustomerApplyLibraryRecordDO channelCustomerApplyLibraryRecordDO);

    /**
     * do 转 entity
     *
     * @param channelInfoDO channelInfoDO
     * @return ChannelInfo
     */
    ChannelInfo toChannelInfo(ChannelInfoDO channelInfoDO);

    /**
     * do 转 entity
     * @param channelPromotionDO channelPromotionDO
     * @return ChannelPromotionInfo
     */
    ChannelPromotion toChannelPromotion(ChannelPromotionDO channelPromotionDO);


    /**
     * result 转 entity
     * @param result result
     * @return ChannelPromotionInfo
     */
    ChannelPromotionInfo toChannelPromotionInfo(ChannelPromotionInfoResult result);

    /**
     * result 转 entity
     * @param result result
     * @return ChannelPromotionInfo
     */
    ChannelPromotionPriceInfo toChannelPromotionPriceInfo(ChannelPromotionPriceInfoResult result);

    /**
     * do 转 entity
     * @param channelPromotionCustomConfigDO channelPromotionCustomConfigDO
     * @return ChannelPromotionInfo
     */
    ChannelCustomConfig toChannelCustomConfig(ChannelPromotionCustomConfigDO channelPromotionCustomConfigDO);

    /**
     * do 转 entity
     * @param channelPromotionLinkConfigDO channelPromotionLinkConfigDO
     * @return  ChannelPromotionLinkConfig
     */
    ChannelPromotionLinkConfig toChannelPromotionLinkConfig(ChannelPromotionLinkConfigDO channelPromotionLinkConfigDO);

    /**
     * do 转 entity
     * @param channelPromotionUnitPriceConfigDO channelPromotionUnitPriceConfigDO
     * @return  ChannelPromotionUnitPriceConfig
     */
    ChannelPromotionUnitPriceConfig toChannelPromotionUnitPriceConfig(ChannelPromotionUnitPriceConfigDO channelPromotionUnitPriceConfigDO);

    /**
     * do 转 entity
     * @param channelPromotionCustomConfigDO channelPromotionCustomConfigDO
     * @return  ChannelPromotionCustomConfig
     */
    ChannelPromotionCustomConfig toChannelPromotionCustomConfig(ChannelPromotionCustomConfigDO channelPromotionCustomConfigDO);

    /**
     * do 转 entity
     * @param channelTypeDO channelTypeDO
     * @return ChannelPromotionInfo
     */
    ChannelType toChannelType(ChannelTypeDO channelTypeDO);


    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelPromotionMerchantConfigDO
     */
    ChannelPromotionMerchantConfigDO formChannelPromotionMerchantConfig(ChannelPromotionMerchantConfig entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelAdvanceChargeRecordDO
     */
    ChannelAdvanceChargeRecordDO formChannelAdvanceChargeRecord(ChannelAdvanceChargeRecord entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelPromotionApiCustomerConfigDO
     */
    ChannelPromotionApiCustomerConfigDO formChannelPromotionApiCustomerConfig(ChannelPromotionApiCustomerConfig entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelCustomerApplyLibraryRecordDO
     */
    ChannelCustomerApplyLibraryRecordDO formChannelCustomerApplyLibraryRecord(ChannelCustomerApplyLibraryRecord entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelInfoDO
     */
    ChannelInfoDO formChannelInfo(ChannelInfo entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelPromotionDO
     */
    ChannelPromotionDO formChannelPromotion(ChannelPromotion entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelPromotionBasicInfoDO
     */
    ChannelPromotionBasicInfoDO formChannelPromotionBasicInfo(ChannelPromotionBasicInfo entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelPromotionLinkConfigDO
     */
    ChannelPromotionLinkConfigDO formChannelPromotionLinkConfig(ChannelPromotionLinkConfig entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelPromotionUnitPriceConfigDO
     */
    ChannelPromotionUnitPriceConfigDO formChannelPromotionUnitPriceConfig(ChannelPromotionUnitPriceConfig entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelPromotionUnitPriceConfigVersionDO
     */
    ChannelPromotionUnitPriceConfigVersionDO formChannelPromotionUnitPriceConfigVersion(ChannelPromotionUnitPriceConfigVersion entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelPromotionCustomConfigDO
     */
    ChannelPromotionCustomConfigDO formChannelPromotionCustomConfig(ChannelPromotionCustomConfig entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return ChannelTypeDO
     */
    ChannelTypeDO formChannelType(ChannelType entity);

}
